package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc SeparateKeyClassPropertyCodeDto
 * @使用场景
 */
@Data
public class SeparateKeyClassPropertyCodeDto
        extends BaseDto
        implements Serializable {

    /**
     * 变更字段英文名
     */
    @ApiModelProperty("变更字段英文名")
    private String objectPropertyCode;

    /**
     * 变更字段原始值
     */
    @ApiModelProperty("变更字段原始值")
    private String metaDataColumnContent;

    /**
     * 内容表主键ID
     */
    @ApiModelProperty("内容表主键ID")
    private String entityId;

    /**
     * 内容表主键字段英文名
     */
    @ApiModelProperty("内容表主键字段英文名")
    private String entityName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        SeparateKeyClassPropertyCodeDto that = (SeparateKeyClassPropertyCodeDto) o;
        return objectPropertyCode == that.objectPropertyCode && metaDataColumnContent == that.metaDataColumnContent && entityId == that.entityId && entityName == that.entityName;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), objectPropertyCode, metaDataColumnContent, entityId, entityName);
    }

}
